package com.unitd.frame.comm.exception;

/**
 * @desc 自定义的异常类, 主要用于定义、抛出整个框架中程序运行时无法确定的其他异常统一使用此自定义异常类来抛出
 * @filename SysRunTimeException.java
 * @copyright www.unitd.com
 * @author Hudan
 * @version 1.0
 * @date 2017/3/8
 */
public class SysRunTimeException extends UnitdBaseException {

	private int code = 500;
	private String msg;

	public SysRunTimeException(String msg) {
		super(msg);
		this.msg = msg;
	}

	public SysRunTimeException(Throwable throwable) {
		super(throwable);
	}

	public SysRunTimeException(String msg, Throwable throwable) {
		super(msg, throwable);
		this.msg = this.msg + "," + throwable.getMessage();
	}

	public SysRunTimeException(String msg, int code) {
		super(msg);
		this.msg = msg;
		this.code = code;
	}

	public SysRunTimeException(String msg, int code, Throwable e) {
		super(msg, e);
		this.msg = msg;
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}
}